package com.eportal.service;

import com.eportal.domain.CInstallUnit;
import com.eportal.domain.Sysopt;
import com.eportal.vo.controller.background.cinstallunit.CInstallUnitSelectListVO;
import com.eportal.vo.controller.background.cinstallunit.ListBudingAndUnitVO;
import com.framework.jqgrid.JqGridPager;

import java.util.List;
import java.util.Map;


public interface CInstallUnitService {

	List<CInstallUnit> list(JqGridPager jqGridPager, String communityId);

    List<CInstallUnit> list(String where);

    CInstallUnit add(CInstallUnit cInstallUnit) throws Exception;

    void delete(Long id);

    void update(CInstallUnit cInstallUnit) throws Exception;

    void delete(List<Long> ids);

    CInstallUnit get(Long id);

	Map<String, Object> updateMethod(CInstallUnit cInstallUnit);

	Map<String, Object> deleteMethod(String ids);

	/** 级联楼栋表查询*/
	Map<String, String> getCInstallUnit(Long sid);

	Map<String, String> getBySql(Long sid);

	List<Map<String, String>> listBySql(String string);

	Map<String, Object> addMethod(CInstallUnit cInstallUnit);

	void dateteUselessBuild();

	List<Map<String, Object>> queryBySql(String communityId);


//todo -----------------------------------------------------------------------------------------

	/**
	 * 单元下拉列表
	 * @author Saber
	 * @Date 2017/8/10 上午9:46
	 * @param cbuildingId	楼栋id
	 * @param user			当前用户
	 * @param userRole		当前用户userRole
	 * @return
	 */
	List<CInstallUnitSelectListVO> selectList(String cbuildingId, Sysopt user, int userRole);

	/**
	 * 所有的楼栋单元列表
	 * @author Saber
	 * @Date 2017/8/22 下午5:08
	 * @param communityId		小区id
	 * @param user				当前用户
	 * @param userRole			当前用户userRole
	 * @see CInstallUnitService#queryBySql(String)
	 * @return
	 */
	List<ListBudingAndUnitVO> listBudingAndUnit(String communityId, Sysopt user, int userRole);
}
